/*
 * WordBook.java
 *
 * Created on 30.9.2007, 16:37:20
 *
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package eu.easyedu.dictionary.api.nservice.spi;

import eu.easyedu.dictionary.api.model.Dictionary;
import eu.easyedu.dictionary.api.model.Language;
import eu.easyedu.dictionary.api.model.Relationship;
import eu.easyedu.dictionary.api.model.Word;
import eu.easyedu.dictionary.api.model.WordRelationship;
import eu.easyedu.dictionary.api.nservice.impl.SearchType;
import java.util.List;

/**
 *
 * @author hlavki
 */
public interface WordBookService {

    List<Word> getRelatedWords(Dictionary dict, Word word, Relationship relationship);

    List<Word> getRelatedWords(Dictionary dict, String word, Language lang, Relationship relationship);

    boolean isRelatedTo(Dictionary dict, Word word, Word subject, Relationship relationship);

    boolean isRelatedTo(Dictionary dict, String word, Language lang, Relationship relationship);

    Language getLanguage(Dictionary dict, String code);

    Word getWord(Dictionary dict, String word, Language lang);

    Word getWord(Dictionary dict, String word, String lang);

    List<Word> getAllWords(Dictionary dict, String lang);

    List<Word> getAllWords(Dictionary dict, String word, Language language, SearchType type);

    List<WordRelationship> getAllRelatedWords(Dictionary dict, Word word);

    List<Language> getAllLanguages(Dictionary dict);

    Word addWord(Dictionary dict, Word word);

    Word addWord(Dictionary dict, Word word, List<WordRelationship> relationships);

    void addRelationships(Dictionary dict, List<WordRelationship> relationships);

    Language addLanguage(Dictionary dict, Language language);
}
